<div class="prod-block {% cycle 'sideclass': '','side' %} {% if forloop.index == 1 or forloop.index == 2 %}first{% endif %} {% if product.available == false %}{% unless settings.order_button %}not-avl{% endunless %}{% endif %}">
  <div class="prod-block-inner">
    <div class="fl prod-img">
      {% if product.available == false %}
      <img src="{{ 'ban.png' | asset_url }}" class="transparent" />
     
      {% endif %}
      <a href="{{product.url}}" style="background: url({{ product.first_image.compact_url}}) center center no-repeat #fff;" class="img"> </a>
      
      {% if template == 'collection' %}
      {% if product.available %}
      {% if account.enable_comparison? %}
      <!--<input type="checkbox" name="compare{{product.id}}" value="0" class="add_to_compare" rel="{{ product.id }}" />-->
      <a href="#" class="add_to_compare" rel="{{ product.id }}">+ Сравнить</a>      
      {% endif %} 
      {% else %}      
      {% if product.similar_products.size > 0 %}
      <center><a href="{{product.url}}#similar" class="similar-link">похожие товары</a></center>
      {% endif %}
      {% endif %}
      {% endif %}
    </div>	
   
    <div class="fr prod-info">
      <h2><a href="{{product.url}}">{{product.title | truncate: 50}}</a></h2>
      <p class="prod-descr {% if product.short_description.size > 120 %}init-tooltip{% endif %}" {% if product.short_description.size > 120 %} title="{{product.short_description | strip_html | escape }}" {% endif %}>
        {{product.short_description | truncate: 120}}
      </p>
      <div class="buyzone">
        <p><span class="price">{{ product.variants.first.price | money }}</span><br />{% if product.old_price %}<span class="old-price">{{product.old_price | money}}</span>{% endif %}&nbsp;</p>
        <form action="{{ cart_url }}" method="post">
          {% unless product.variants.size > 1 %} <input type="text" class="qty quantity_input" name="quantity" size="3" value="1" /> {% endunless %}     
          <input type="hidden" name="variant_id" value="{{ product.variants.first.id }}" />
          {% if product.available %}
            {% if product.variants.size > 1 %}
          <input type="button" value="Купить" class="buy_button" onclick="document.location.href='{{product.url}}'" />
            {% else %}
          <input type="submit" class="buy_button buy" value="КУПИТЬ" />
            {% endif %}
          {% else %}
          
            {% if settings.order_button %}
              {% if product.variants.size > 1 %}
          <input type="button" value="Под заказ" class="buy_button order_button" onclick="document.location.href='{{product.url}}'" />
              {% else %}
          <input type="submit" class="buy buy_button order_button" value="ПОД ЗАКАЗ" />
              {% endif %}   
            {% else %}
          <input type="submit" disabled="disabled" class="buy_button" value="КУПИТЬ" />
            {% endif %}
          {% endif %}
        </form>
      </div>
    </div>
  </div>	
</div>



